<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@page isELIgnored="false"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
      <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title></title>
    <link href="${pageContext.request.contextPath}/static/assets/css/bootstrap.css" rel="stylesheet" />
    <link href="${pageContext.request.contextPath}/static/assets/css/font-awesome.css" rel="stylesheet" />
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/assets/css/profile.css">
    <link href="${pageContext.request.contextPath}/static/assets/css/custom-styles.css" rel="stylesheet" />
    <script src="${pageContext.request.contextPath}/static/js/zoom.js"></script>
    <link href="${pageContext.request.contextPath}/static/assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
</head>
<body>
 <form:form commandName="User" method="post" class="registerform"  enctype="multipart/form-data">  
        <div id="page-wrapper" >
          <div id="page-inner">
			 <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-header">
                           User <small>management</small>
                        </h1>
                    </div>
              </div>             
            <div class="row">
                <div class="col-md-12" >
                   <div class="well profile">
                            <div class="col-sm-12">
                                <div class="col-xs-12 col-sm-4 text-center">
                                    <ul class="list-group">
                                        <li class="list-group-item text-left">
                                            <span class="fa fa-male"></span>&nbsp;&nbsp;Profile
                                        </li>
                                        <li class="list-group-item text-center">
                                            <img src="${User.displayPic }" alt="" class="img-circle img-responsive img-profile">
                                        </li>
                                        <li class="list-group-item text-center">
                                            <span class="pull-left">
                                                <strong>信誉度</strong>
                                            </span>
                                            <div class="ratings">
                                             <c:choose>
                                             	<c:when test="${User.credibility==0}">                                            		
                                                    	<span class="fa fa-star"></span>
                                                		<span class="fa fa-star"></span>
                                                		<span class="fa fa-star"></span>
                                             	</c:when>                                             
                                             	<c:when test="${User.credibility==1}">
                                             		<a>
                                                    	<span class="fa fa-star"></span>
                                                	</a>
                                                	<span class="fa fa-star"></span>
                                                	<span class="fa fa-star"></span>
                                             	</c:when>
                                               <c:when test="${User.credibility==2 }">
                                             		<a>
                                                    	<span class="fa fa-star"></span>
                                                	</a>
                                                	<a>
                                                    	<span class="fa fa-star"></span>
                                               		 </a>
                                               		 <span class="fa fa-star"></span>
                                             	</c:when>
                                                <c:when test="${User.credibility==3 }">
                                             		<a>
                                                    	<span class="fa fa-star"></span>
                                                	</a>
                                                	<a>
                                                    	<span class="fa fa-star"></span>
                                               		 </a>
                                               		 <a>
                                                    	<span class="fa fa-star"></span>
                                               		 </a>
                                             	</c:when>                                            	
                                                </c:choose>                                             
                                            </div>
                                        </li>
                                        <li class="list-group-item text-right">
                                            <span class="pull-left">
                                                <strong>注册时间</strong>
                                            </span><fmt:formatDate value="${User.registerTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
                                        </li>
                                        <li class="list-group-item text-right">
                                            <span class="pull-left">
                                                <strong>最近一次上线时间</strong>
                                            </span><fmt:formatDate value="${User.loginTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
                                        </li>
                                        <li class="list-group-item text-right">
                                            <span class="pull-left">
                                                <strong>昵称</strong>
                                            </span>${User.nickname }
                                        </li>
                                    </ul>
                                </div>
                                <div class="col-xs-12 col-sm-8 profile-name">
                                  <h2>${User.nickname } <span class="pull-right social-profile"> <em class="entypo-facebook-circled"></em> <em class="entypo-twitter-circled"></em> <em class="entypo-linkedin-circled"></em> <em class="entypo-github-circled"></em> <em class="entypo-gplus-circled"></em> </span> </h2>
                                  <hr>
                                    <dl class="dl-horizontal-profile">
                                        <dt>用户编号</dt>
                                        <dd>${User.userCode }</dd>                                       
                                        <dt>手机号码</dt>
                                        <dd>${User.mobile }</dd>
                                        <dt>星座</dt>
                                        <dd>${User.horoscope }</dd>
                                        <dt>性别</dt>
                                        <dd>${User.sex}</dd>
                                        <dt>出生日期</dt>
                                        <dd>${User.birthday}</dd>
                                        <dt>身份证号</dt>
                                        <dd>${User.idCard }</dd>
                                        <dt>信誉度</dt>
                                        <dd>${User.credibility}星</dd>                                        
                                        <dt>标签</dt>
                                        <dd>
                                            <span class="tags" id="a"></span>
                                            <span class="tags" id="b"></span>
                                            <span class="tags" id="c"></span>                                            
                                        </dd>
                                    </dl>
                                    <hr>                                      
                                </div>
                            </div>
                            <div class="col-xs-12 divider text-center">
                           
                            	<table>
                            	<c:if test="${User.img1 != null or User.img2 != null or User.img3 != null or User.img4 != null or User.img5 != null or User.img6 != null }">
	                            	<tr>
	                            		<c:if test="${User.img1 != null}">
		                            		<td align="center"><img  src="${User.img1}" data-action="zoom" width="200px" ></td>
		                            	</c:if>
		                            	<c:if test="${User.img2 != null}">
			                            	<td align="center"><img  src="${User.img2}" data-action="zoom" width="200px" ></td>
			                            </c:if>
			                            <c:if test="${User.img3 != null}">
			                            	<td align="center"><img  src="${User.img3}" data-action="zoom" width="200px" ></td>
			                            </c:if>
			                            <c:if test="${User.img4 != null}">
			                           		<td align="center"> <img  src="${User.img4}" data-action="zoom" width="200px" ></td>
			                            </c:if>
			                           <c:if test="${User.img5 != null}">
			                            	<td align="center"><img  src="${User.img5}" data-action="zoom" width="200px" ></td>
			                            </c:if>
			                            <c:if test="${User.img6 != null}">
			                            	<td align="center"><img  src="${User.img6}" data-action="zoom" width="200px" ></td>
			                            </c:if>		                            
		                            </tr>
	                            </c:if>
	                            <tr>
	                            	<td align="center" ><input type="file" name="files"  value="图片1"  /></td>
									<td align="center"><input type="file" name="files"  value="图片2"  /></td>
									<td align="center"><input type="file" name="files"  value="图片3"  /></td>
									<td align="center"><input type="file" name="files"  value="图片4"  /></td>
									<td align="center"><input type="file" name="files"  value="图片5"  /></td>
									<td align="center"><input type="file" name="files"  value="图片6"  /></td>
		                         </tr>
	                            </table>                    
                                <div class="col-xs-12 col-sm-4 emphasis">                             
                                    <p>
                                        <small>订单</small>
                                    </p>
                                    <a href="${pageContext.request.contextPath}/order" style="text-decoration:none;"><button class="btn btn-success btn-block">
                                        <span class="fa fa-plus-circle"></span>&nbsp;&nbsp; 详情</button></a>
                                </div>
                                <div class="col-xs-12 col-sm-4 emphasis">                                  
                                    <p>
                                        <small>提交</small>
                                    </p>
                                    <form:button class="btn btn-info btn-block">
                                        <span class="fa fa-user"></span>&nbsp;&nbsp;${op }</form:button>
                                </div>
                                <div class="col-sm-4 emphasis">                                
                                    <p>
                                        <small>代金券</small>
                                    </p>
                                    <a href="${pageContext.request.contextPath}/allowance?userCode=${User.userCode }" style="text-decoration:none;"><button class="btn btn-warning btn-block">
                                        <span class="fa fa-money"></span>&nbsp;&nbsp;详情</button></a>
                            	</div>
                        	</div>
                		</div>
					</div>            
       		 	</div> 
       		        
    		</div>
    	</div>	
    	</form:form> 
 </body>
    <script src="${pageContext.request.contextPath}/static/assets/js/jquery-1.10.2.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/jquery.metisMenu.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/dataTables/jquery.dataTables.js"></script>
    <script src="${pageContext.request.contextPath}/static/assets/js/dataTables/dataTables.bootstrap.js"></script>
        <script>
            $(document).ready(function () {

            });                                  
    </script>
    
    <script type="text/javascript">
    	var arr='${User.impressionLabel}'.split(","); 
    	$("#a").text(arr[0]);
    	$("#b").text(arr[1]);
    	$("#c").text(arr[2]);
    	
        
        function sb() {
        	if (window.confirm("是否确认要提交?")) { 
        		// 确认时做的操作 
        		return true;
        	} else { 
        		// 取消时做的操作 
        		return false;
        	} 
        }
    </script> 
    <script src="${pageContext.request.contextPath}/static/assets/js/custom-scripts.js"></script>  
</html>
